<?php


namespace App\factory;


use App\Http\Service\api\BankAudit;
use App\Models\User;
use App\Models\UserBank;
use App\Models\UserExtract;

class Bank implements Extract
{
   public static function payExtract($data)
   {
       // TODO: Implement payExtract() method.
       //获取当前用户信息
       $user_infor = User::information($data['uid']);
       $audit= BankAudit::bank($data['bank_code'],$user_infor['phone'],$user_infor['card_id'],$user_infor['real_name']);
       UserExtract::createExtract($data['uid'],$user_infor,$audit,$data['bank_code'],$data['extract_price']);
       return true;
   }
}
